<template>
  <div class="contractAdd" v-loading="detailInfoShow">
    <!-- 筛选按钮 -->
    <!-- <div class="search-button">
      <el-button
        v-if="pageType !== 'detail'"
        class="btn save"
        @click="handleAddSave()"
        ><el-icon class="icon" color="#fff"> <Tickets /> </el-icon
        >保存</el-button
      >
      <el-button class="btn direction" @click="handleBack"
        ><el-icon class="icon" color="#fff"> <Back /> </el-icon
        >返回</el-button
      >
    </div> -->
    <el-collapse v-model="activeNames">
      <el-collapse-item
        name="1"
        style="position: relative"
        class="transform-down"
      >
        <template #title>
          <span class="circle"></span>
          <span class="collapse-title"> 执行情况</span>
        </template>
        <div class="contract-info">
          <el-form
            :model="contractForm"
            ref="projectFormRef"
            :rules="queryRules"
            label-width="130px"
            v-enterToNext
          >
            <!-- :disabled="pageType === 'detail'" -->
            <el-row>
              <el-col :span="12">
                <el-form-item label="实际开始时间：" prop="actualStartTime">
                  <el-date-picker
                    format="YYYY-MM-DD"
                    value-format="YYYY-MM-DD"
                    v-model="contractForm.actualStartTime"
                    class="search-input"
                    type="date"
                    placeholder="请选择"
                     @change="handleTimeChange(1)"
                  />
                </el-form-item>
              </el-col>

              <el-col :span="12">
                <el-form-item label="实际结束时间：" prop="finishTime">
                  <el-date-picker
                    format="YYYY-MM-DD"
                    value-format="YYYY-MM-DD"
                    v-model="contractForm.finishTime"
                    class="search-input"
                    type="date"
                    placeholder="请选择"
                     @change="handleTimeChange(2)"
                    :default-time="new Date(2000, 1, 1, 23, 59, 59)"
                  />
                </el-form-item>
              </el-col>
            </el-row>
            <el-col :span="24">
              <el-form-item label="情况说明：">
                <el-input
                  v-model="contractForm.performance"
                  type="textarea"
                  :rows="5"
                  maxlength="500"
                  placeholder="请填写"
                ></el-input>
              </el-form-item>
            </el-col>
            <el-row>
              <el-col :span="12">
                <el-form-item label="相关文档：">
                  <Upload
                    :fileList="contractForm.ywImplProAddFileReqVos"
                    :limit="5"
                    limitation="templatelimitation"
                    accept=".doc,.docx"
                    :isFull="true"
                    :isCanDelete="true"
                    :showButton="true"
                    @success="(result) => uploadSuccess(result,0)"
                    @deleteFile="(result) => uploadRemove(result,0)"
                  />
                </el-form-item>
              </el-col>
            </el-row>
          </el-form>
        </div>
      </el-collapse-item>

      <el-collapse-item
        name="2"
        style="position: relative"
        class="transform-down"
        v-if="rowdata.missionType === 1"
      >
        <template #title>
          <span class="circle"></span>
          <span class="collapse-title">现场点位</span>
         
        </template>
        <div class="pointBox">
          <div class="contact-info">
            <el-form
              :model="contactForm"
              ref="contactFormRef"
              :rules="queryContactRules"
              label-width="140px"
              v-enterToNext
            >
              <el-row>
                <el-col :span="12">
                  <el-form-item label="点位名称：" prop="pointAdd">
                    <el-input
                      v-model="contactForm.pointAdd"
                      placeholder="请填写"
                      clearable 
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="详细地址：" prop="detailAdd">
                    <el-input
                      v-model="contactForm.detailAdd"
                      placeholder="请填写"
                      clearable 
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="物业名称：" prop="propertyName">
                    <el-input
                      v-model="contactForm.propertyName"
                      placeholder="请填写"
                      clearable 
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="物业联系方式：" prop="propertyWay">
                    <el-input
                      v-model="contactForm.propertyWay"
                      placeholder="请填写"
                      clearable 
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="所属派出所：" prop="policeOffice">
                    <el-input
                      v-model="contactForm.policeOffice"
                      placeholder="请填写"
                      clearable 
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="派出所联系方式：" prop="policeWay">
                    <el-input
                      v-model="contactForm.policeWay"
                      placeholder="请填写"
                      clearable 
                    ></el-input>
                  </el-form-item>
                </el-col>
               
              
              </el-row>
              <el-row>
                <el-col :span="24">
                <el-form-item label="物业租赁合同：">
                  <Upload
                    :fileList="contactForm.suppFileInfoVos7"
                    :limit="10"
                    limitation="templatelimitation"
                    accept=".doc,.docx"
                    :isFull="true"
                    :isCanDelete="pageType == 'detail' ? false : true"
                    :disabled="pageType == 'detail'"
                    :showButton="true"
                    @success="(result) => uploadSuccess(result, 7)"
                    @deleteFile="(result) => uploadRemove(result, 7)"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="现场实地照片：">
                  <Upload
                    :fileList="contactForm.suppFileInfoVos1"
                    :limit="10"
                    limitation="templatelimitation"
                    accept=".doc,.docx"
                    :isFull="true"
                    :isCanDelete="pageType == 'detail' ? false : true"
                    :disabled="pageType == 'detail'"
                    :showButton="true"
                    @success="(result) => uploadSuccess(result, 1)"
                    @deleteFile="(result) => uploadRemove(result, 1)"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="外包用工合同：">
                  <Upload
                    :fileList="contactForm.suppFileInfoVos2"
                    :limit="10"
                    limitation="templatelimitation"
                    accept=".doc,.docx"
                    :isFull="true"
                    :isCanDelete="pageType == 'detail' ? false : true"
                    :disabled="pageType == 'detail'"
                    :showButton="true"
                    @success="(result) => uploadSuccess(result, 2)"
                    @deleteFile="(result) => uploadRemove(result, 2)"
                  />
                </el-form-item>
              </el-col>
              </el-row>
            </el-form>
            <div
              class="nofixed-search-button"
              style="position: static; margin-top: 20px"
              v-if="pageType !== 'detail'"
            >
              <el-button
                class="btn add"
                @click.stop="handleContactAdd(contactFormRef)"
                ><el-icon class="icon" color="#fff"> <Plus /> </el-icon
                >添加</el-button
              >
              <el-button class="btn submit" @click="handleRefresh"
          ><el-icon class="icon" color="#fff"> <Refresh /> </el-icon
          >重置</el-button
        >
            </div>
          </div>
          <div class="contact-table-info">
            <div
              class="box-item" 
              v-for="(item, index) in contractForm.patrolSchemeAddInfoVos"
              :key="index"
            >
             <div class="item-btn">
              <img
              style="margin-right:10px;"
                    src="@/assets/icons/images/edit.png"
                    class="table-icon"
                    title="编辑"
                    @click="handleOperate('edit', item, index)"
                  />
                  <img
                    src="@/assets/icons/images/delete.png"
                    class="table-icon"
                    title="删除"
                    @click="handleOperate('delete', item,index)"
                  />
             </div>
              <div style="font-size: 16px;" class="mb10">{{item.pointAdd}}</div>
              <div  class="mb10">{{item.detailAdd}}</div>
              <div class="item mb10">
                <div class="item">
                  <span class="box-title">物业名称：</span>
                  <span class="box-content">{{item.propertyName}}</span>
                </div>
                <div class="item" style="margin-left:20px;">
                  <span class="box-title">物业联系方式：</span>
                  <span class="box-content">{{item.propertyWay}}</span>
                </div>
              </div>
              <div class="item mb10">
                <div class="item">
                  <span class="box-title">派出所：</span>
                  <span class="box-content">{{item.policeOffice}}</span>
                </div>
                <div class="item" style="margin-left:20px;">
                  <span class="box-title">派出所联系方式：</span>
                  <span class="box-content">{{item.policeWay}}</span>
                </div>
              </div>

              <div class="item mb10">
                <div class="item">
                  <span class="box-title">租赁合同：</span>
                  
                  <div v-if="item.suppFileInfoVos7.length">
                    <Upload
                    :fileList="item.suppFileInfoVos7"
                    :limit="10"
                    limitation="templatelimitation"
                    accept=".doc,.docx"
                    :isFull="true"
                    :isCanDelete="false"
                    :disabled="false"
                    :showButton="false"
                    @success="(result) => uploadSuccess(result, 7)"
                    @deleteFile="(result) => uploadRemove(result, 7)"
                  />
                  </div>
                  <div v-else>
                  暂无文件
                  </div>
                </div>
              </div>
              <div class="item mb10">
                <div class="item">
                  <span class="box-title">现场照片：</span>
                  <div v-if="item.suppFileInfoVos1.length">
                    <Upload
                    :fileList="item.suppFileInfoVos1"
                    :limit="10"
                    limitation="templatelimitation"
                    accept=".doc,.docx"
                    :isFull="true"
                    :isCanDelete="false"
                    :disabled="false"
                    :showButton="false"
                    @success="(result) => uploadSuccess(result, 7)"
                    @deleteFile="(result) => uploadRemove(result, 7)"
                  />
                  </div>
                  <div v-else>
                  暂无文件
                  </div>
                </div>
              </div>
              <div class="item mb10">
                <div class="item">
                  <span class="box-title">外包合同：</span>
                 
                  <div v-if="item.suppFileInfoVos2.length">
                    <Upload
                    :fileList="item.suppFileInfoVos2"
                    :limit="10"
                    limitation="templatelimitation"
                    accept=".doc,.docx"
                    :isFull="true"
                    :isCanDelete="false"
                    :disabled="false"
                    :showButton="false"
                    @success="(result) => uploadSuccess(result, 7)"
                    @deleteFile="(result) => uploadRemove(result, 7)"
                  />
                  </div>
                  <div v-else>
                  暂无文件
                  </div>
                </div>
              </div>
            </div>

            
           
          </div>
        </div>
      </el-collapse-item>

      <el-collapse-item
      v-else
        name="3"
        style="position: relative"
        class="transform-down"
      >
        <template #title>
          <span class="circle"></span>
          <span class="collapse-title">现场安装/调试任务明细</span>
         
        </template>
        <div class="pointBox">
          <div class="contact-info">
            <el-form
              :model="contactForm"
              ref="contactFormRef"
              :rules="queryContactRules"
              label-width="140px"
              v-enterToNext
            >
              <el-row>
                <el-col :span="12">
                  <el-form-item label="所属防区：" prop="armedzoneId">
                    <el-select
                    v-model="contactForm.armedzoneId"
                    placeholder="请选择"
                    clearable
                    class="search-input"
                    @change="handleDefenseChange"
                  >
                    <el-option
                      v-for="dict in defenseList"
                      :key="dict.id"
                      :label="dict.armedzoneName"
                      :value="dict.id"
                    />
                  </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="安装点位：" prop="pointName">
                    <el-select
                        filterable
                        style="width: 268px"
                        v-model="contactForm.pointName"
                        placeholder="请选择"
                        clearable
                        class="search-select"
                        @change="handlePointChange"
                      >
                        <el-option
                          v-for="dict in pointList"
                          :key="dict.projectTaskDetailId"
                          :label="dict.pointAdd"
                          :value="dict.projectTaskDetailId"
                        />
                      </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                <el-form-item label="设备名称："  prop="deviceId">
                  <!--  -->
                  <!-- v-model="contactForm.deviceName" -->
                  <el-select 
                    v-model="contactForm.deviceId"
                    placeholder="请选择"
                    clearable
                    class="search-input"
                    @change="handleDeviceChange"
                  >
                    <el-option
                      v-for="dict in deviceList"
                      :key="dict.id"
                      :label="dict.armedzoneName"
                      :value="dict.id"
                    />
                  </el-select>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="设备编号：" prop="deviceUuid">
                  <el-input
                    maxlength="30"
                    v-model="contactForm.deviceUuid"
                    placeholder="请输入"
                    clearable
                    class="search-input"
                  />
                </el-form-item> </el-col
              >
              <el-col :span="12">
                <el-form-item
                  label="路由器品牌型号："
                  prop="routBrand"
                 
                >
                  <el-input
                    maxlength="30"
                    v-model="contactForm.routBrand"
                    placeholder="请输入"
                    clearable
                    class="search-input"
                  />
                </el-form-item> </el-col
              >
                <el-col :span="12">
                <el-form-item label="SIM卡信息：" prop="simCard">
                  <el-input
                    maxlength="30"
                    v-model="contactForm.simCard"
                    placeholder="请输入"
                    clearable
                    class="search-input"
                  />
                </el-form-item> </el-col
              >
              <el-col :span="12">
                <el-form-item
                  label="安装时间："
                  prop="installTime"
                 
                >
                 
                  <el-date-picker
                    ref="refInput"
                    v-model="contactForm.installTime"
                    format="YYYY/MM/DD"
                    class="search-input"
                    value-format="YYYY-MM-DD"
                    type="date"
                    placeholder="请选择"
                  />
                </el-form-item> </el-col
              >
              
              </el-row>
              <el-row>
                <el-col :span="24">
                <el-form-item label="配件清单表：" prop="suppFileInfoVos3">
                  <Upload
                    :fileList="contactForm.suppFileInfoVos3"
                    :limit="10"
                    limitation="templatelimitation"
                    accept=".doc,.docx"
                    :isFull="true"
                    :isCanDelete="pageType == 'detail' ? false : true"
                    :disabled="pageType == 'detail'"
                    :showButton="true"
                    @success="(result) => uploadSuccess(result, 3)"
                    @deleteFile="(result) => uploadRemove(result, 3)"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="用电协议：" prop="suppFileInfoVos4">
                  <Upload
                    :fileList="contactForm.suppFileInfoVos4"
                    :limit="10"
                    limitation="templatelimitation"
                    accept=".doc,.docx"
                    :isFull="true"
                    :isCanDelete="pageType == 'detail' ? false : true"
                    :disabled="pageType == 'detail'"
                    :showButton="true"
                    @success="(result) => uploadSuccess(result, 4)"
                    @deleteFile="(result) => uploadRemove(result, 4)"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item
                  label="现场完成照片："
              
                  prop="suppFileInfoVos5"
                >
                  <Upload
                    :fileList="contactForm.suppFileInfoVos5"
                    :limit="10"
                    limitation="templatelimitation"
                    accept=".doc,.docx"
                    :isFull="true"
                    :isCanDelete="pageType == 'detail' ? false : true"
                    :disabled="pageType == 'detail'"
                    :showButton="true"
                    @success="(result) => uploadSuccess(result, 5)"
                    @deleteFile="(result) => uploadRemove(result, 5)"
                  />
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="现场设备照片：" prop="suppFileInfoVos6">
                  <Upload
                    :fileList="contactForm.suppFileInfoVos6"
                    :limit="10"
                    limitation="templatelimitation"
                    accept=".doc,.docx"
                    :isFull="true"
                    :isCanDelete="pageType == 'detail' ? false : true"
                    :disabled="pageType == 'detail'"
                    :showButton="true"
                    @success="(result) => uploadSuccess(result, 6)"
                    @deleteFile="(result) => uploadRemove(result, 6)"
                  />
                </el-form-item>
              </el-col>
              </el-row>
            </el-form>
            <div
              class="nofixed-search-button"
              style="position: static; margin-top: 20px"
              v-if="pageType !== 'detail'"
            >
              <el-button
                class="btn add"
                @click.stop="handleContactAdd(contactFormRef)"
                ><el-icon class="icon" color="#fff"> <Plus /> </el-icon
                >添加</el-button
              >
              <el-button class="btn submit" @click="handleRefresh"
          ><el-icon class="icon" color="#fff"> <Refresh /> </el-icon
          >重置</el-button
        >
            </div>
          </div>
          <div class="contact-table-info">
            <div
              class="box-item" 
              v-for="(item, index) in contractForm.patrolSchemeAddInfoVos"
              :key="index"
            >
             <div class="item-btn">
              <img
              style="margin-right:10px;"
                    src="@/assets/icons/images/edit.png"
                    class="table-icon"
                    title="编辑"
                    @click="handleOperate('edit', item, index)"
                  />
                  <img
                    src="@/assets/icons/images/delete.png"
                    class="table-icon"
                    title="删除"
                    @click="handleOperate('delete', item,index)"
                  />
             </div>
              <div style="font-size: 16px;" class="mb10">{{item.deviceName}}</div>
              <div  class="mb10">设备编号：{{item.deviceUuid}}</div>
              <div class="item mb10">
                <div class="item">
                  <span class="box-title">所属防区：</span>
                  <span class="box-content">{{item.armedzoneName}}</span>
                </div>
                <div class="item" style="margin-left:20px;">
                  <span class="box-title">安装点位：</span>
                  <span class="box-content">{{item.pointNameChi}}</span>
                </div>
              </div>
              <div class="item mb10">
                <div class="item">
                  <span class="box-title">设备型号：</span>
                  <span class="box-content">{{item.deviceModel}}</span>
                </div>
                <div class="item" style="margin-left:20px;">
                  <span class="box-title">设备类型：</span>
                  <span class="box-content">{{item.deviceTypeName}}</span>
                </div>
              </div>

              <div class="item mb10">
                <div class="item">
                  <span class="box-title">安装时间：</span>
                  <span class="box-content">{{item.installTime}}</span>
                </div>
                <div class="item" style="margin-left:20px;">
                  <span class="box-title">安装方式：</span>
                  <span class="box-content">{{item.installType}}</span>
                </div>
              </div>

              <div class="item mb10">
                <div class="item">
                  <span class="box-title">IP地址：</span>
                  <span class="box-content">{{item.ipAddress}}</span>
                </div>
                <div class="item" style="margin-left:20px;">
                  <span class="box-title">路由器品牌型号：</span>
                  <span class="box-content">{{item.routBrand}}</span>
                </div>
              </div>

              <div class="item mb10">
                <div class="item">
                  <span class="box-title">SIM卡信息：</span>
                  <span class="box-content">{{item.simCard}}</span>
                </div>
                <div class="item" style="margin-left:20px;">
                  <!-- <span class="box-title">设备类型：</span>
                  <span class="box-content">{{item.policeWay}}</span> -->
                </div>
              </div>

              <div class="item mb10">
                <div class="item">
                  <span class="box-title">配件清单表：</span>
                  
                  <div v-if="item.suppFileInfoVos3.length">
                    <Upload
                    :fileList="item.suppFileInfoVos3"
                    :limit="10"
                    limitation="templatelimitation"
                    accept=".doc,.docx"
                    :isFull="true"
                    :isCanDelete="false"
                    :disabled="false"
                    :showButton="false"
                    @success="(result) => uploadSuccess(result, 7)"
                    @deleteFile="(result) => uploadRemove(result, 7)"
                  />
                  </div>
                  <div v-else>
                  暂无文件
                  </div>
                </div>
              </div>
              <div class="item mb10">
                <div class="item">
                  <span class="box-title">用电协议：</span>
                  <div v-if="item.suppFileInfoVos4.length">
                    <Upload
                    :fileList="item.suppFileInfoVos4"
                    :limit="10"
                    limitation="templatelimitation"
                    accept=".doc,.docx"
                    :isFull="true"
                    :isCanDelete="false"
                    :disabled="false"
                    :showButton="false"
                    @success="(result) => uploadSuccess(result, 7)"
                    @deleteFile="(result) => uploadRemove(result, 7)"
                  />
                  </div>
                  <div v-else>
                  暂无文件
                  </div>
                </div>
              </div>
              <div class="item mb10">
                <div class="item">
                  <span class="box-title">现场完成照片：</span>
                 
                  <div v-if="item.suppFileInfoVos5.length">
                    <Upload
                    :fileList="item.suppFileInfoVos5"
                    :limit="10"
                    limitation="templatelimitation"
                    accept=".doc,.docx"
                    :isFull="true"
                    :isCanDelete="false"
                    :disabled="false"
                    :showButton="false"
                    @success="(result) => uploadSuccess(result, 7)"
                    @deleteFile="(result) => uploadRemove(result, 7)"
                  />
                  </div>
                  <div v-else>
                  暂无文件
                  </div>
                </div>
              </div>
              <div class="item mb10">
                <div class="item">
                  <span class="box-title">现场设备照片：</span>
                 
                  <div v-if="item.suppFileInfoVos6.length">
                    <Upload
                    :fileList="item.suppFileInfoVos6"
                    :limit="10"
                    limitation="templatelimitation"
                    accept=".doc,.docx"
                    :isFull="true"
                    :isCanDelete="false"
                    :disabled="false"
                    :showButton="false"
                    @success="(result) => uploadSuccess(result, 7)"
                    @deleteFile="(result) => uploadRemove(result, 7)"
                  />
                  </div>
                  <div v-else>
                  暂无文件
                  </div>
                </div>
              </div>
            </div>

            
           
          </div>
        </div>
      </el-collapse-item>
    </el-collapse>
  </div>
</template>

<script setup>
import Upload from "@/components/Upload/index";
import { getUserListApi } from "@/api/operation/work";
import { getDeptListApi } from "@/api/information/customer";
import {
  pollingAddApi,
  pollingEditApi,
  getPollingApi,projectSubmitTaskApi,getPointList,executeTaskInfoApi
} from "@/api/operation/project";
import { getArmedzoneDeviceApi } from "@/api/operation/flightdata.js";

import { getDictsApi } from "@/api/dict";
import { ElMessage, ElMessageBox } from "element-plus";
import {
  getDenfenseList,
} from "@/api/operation/project";
const emit = defineEmits([
  // 回款新增组件显隐
  "followAddShow",
  // 更新回款组件显隐
  "update:followAddShow",
  // 刷新父组件表格数据
  "refreshList",
  "handleDetailInfo",
]);
const props = defineProps({
  // 操作类型
  pageType: {
    type: String,
    default: "add",
  },
  // 操作类型
  rowdata: {
    type: Object,
    default: {},
  },
});
// 折叠栏默认展开
const activeNames = ref(["1", "2", "3"]);
const projectFormRef = ref();
// 联系人表单引用
const contactFormRef = ref();
// 联系人操作类型
const operateType = ref("");
//  详情加载效果
const detailInfoShow = ref(false);
// 联系人当前索引(编辑联系人使用)
const tableIndex = ref(null);
// 下拉框引用
const refSelect = ref();
// 项目id
const projectId = ref(null);
//是否编辑
const editFlag = ref(false);
// 防区列表
const defenseList = ref([]);
// 点位列表
const pointList = ref([]);
// 设备列表
const deviceList = ref([]);
// 合同表单模板
const contractFormTemplate = {
  type:0,
  actualHour: null, // 	实际工时
  actualStartTime: "", // 实际开始时间
  businessId: null, // 业务ID
  businessType: null, // 业务类型erp_business_type(0:项目任务,1:工单申请,2:巡检计划,3:产品评估)
  finishTime: "", // 实际结束时间
  missionCenterId: null, // 任务中心id
  practiceStatus: null, // 实施状态erp_practice_status(0-待启动，1-待分配，2-进行中，3-已完结）用于完结项目
  workStandards: null, // 是否已勾选操作规范：0：否；1：是
  allotRelList: [], // 执行人
  endTime: "", // 	计划结束时间
  estimatedWorkHours: null, // 预估工时
  projectId: null, // 项目id
  performance: "", // 备注
  startTime: "", // 	计划开始时间
  taskType: null, // 	任务类型
  patrolSchemeAddInfoVos: [],
  ywImplProAddFileReqVos: [], // 相关文件
  ywImplProInfoReqVos: [
    {
      suppFileInfoVos: [],
      suppFileInfoVos1: [], // 现场实地照片
      suppFileInfoVos2: [], // 外包用工合同
      suppFileInfoVos3: [], // 配件清单表
      suppFileInfoVos4: [], // 用电协议
      suppFileInfoVos5: [], // 现场完成照片
      suppFileInfoVos6: [], // 现场设备照片
      suppFileInfoVos7: [], // 物业租赁合同
    },
  ],
};
// 巡检删除列表(后端所需)
const deleteList = ref([]);
const data = reactive({
  //合同表单
  contractForm: JSON.parse(JSON.stringify(contractFormTemplate)),
  // 联系人表单
  contactForm: {
    pointName:null,
    pointNameChi:"",
    actualHour: "", // 实际工时
        armedzoneId: null, // 防区id
        armedzoneName: "", // 防区中文
        cityId: null, // 市
        detailAdd: "", // 详细地址
        deviceModel: "", // 	设备型号
        deviceName: "", // 	设备名称
        deviceType: null, // 	设备类型
        deviceTypeName: "", // 	设备类型中文
        deviceUuid: "", // 设备唯一id
        installType: "", // 	安装方式
        ipAddress: "", // IP地址
        manufacturer: "", // 	生产厂家
        pointAdd: "", // 点位地址
        policeOffice: "", // 所属派出所
        policeWay: "", // 民警联系方式
        projectTaskDetailId: null, // 明细id
        propertyName: "", // 物业名称
        propertyWay: "", // 物业联系方式
        provinceId: null, // 	省
        routBrand: "", // 路由器品牌型号
        simCard: "", // SIM卡信息
        suppFileInfoVos1: [], // 现场实地照片
        suppFileInfoVos2: [], // 外包用工合同
        suppFileInfoVos3: [], // 配件清单表
        suppFileInfoVos4: [], // 用电协议
        suppFileInfoVos5: [], // 现场完成照片
        suppFileInfoVos6: [], // 现场设备照片
        suppFileInfoVos7: [], // 物业租赁合同
        zoneId: null, // 区
  },
  queryRules: {
    actualStartTime: [
      { required: true, message: "请选择实际开始时间", trigger: "change" },
    ],
    finishTime: [
      { required: true, message: "请选择实际结束时间", trigger: "change" },
    ],
  },
  // 校验规则
  queryContactRules: {
    actualHour: [
      { required: true, message: "请输入实时工时", trigger: "blur" },
    ],
    deviceId: [
      { required: true, message: "请选择设备名称", trigger: "blur" },
    ],
    deviceModel: [
      { required: true, message: "请输入设备型号", trigger: "blur" },
    ],
    manufacturer: [
      { required: true, message: "请输入生产厂家", trigger: "blur" },
    ],
    installType: [
      { required: true, message: "请输入安装方式", trigger: "blur" },
    ],
    deviceUuid: [{ required: true, message: "请输入设备编号", trigger: "blur" }],
    simCard: [{ required: true, message: "请输入SIM卡信息", trigger: "blur" }],
    routBrand: [
      { required: true, message: "请输入路由器品牌型号", trigger: "blur" },
    ],
    ipAddress: [{ required: true, message: "请输入IP地址", trigger: "blur" }],

    armedzoneId: [
      { required: true, message: "请选择防区", trigger: "change" },
    ],
    pointName: [
      { required: true, message: "请选择安装点位", trigger: "change" },
    ],
    installTime: [
      { required: true, message: "请选择安装时间", trigger: "change" },
    ],
    deviceType: [
      { required: true, message: "请选择设备类型", trigger: "change" },
    ],
   
    detailAdd: [
      { required: true, message: "请输入详细地址", trigger: "blur" },
    ],
    pointAdd: [
      { required: true, message: "请输入点位名称", trigger: "blur" },
    ],
    propertyName: [
      { required: true, message: "请输入物业名称", trigger: "blur" },
    ],
    propertyWay: [
      { required: true, message: "请输入物业联系方式", trigger: "blur" },
    ],
    policeOffice: [
      { required: true, message: "请输入所属派出所", trigger: "blur" },
    ],
    policeWay: [{ required: true, message: "请输入派出所联系方式", trigger: "blur" }],
   

    suppFileInfoVos3: [
      { required: true, message: "请上传配件清单表", trigger: "change" },
    ],
    suppFileInfoVos4: [
      { required: true, message: "请上传用电协议", trigger: "change" },
    ],
    suppFileInfoVos5: [
      { required: true, message: "请上传现场完成照片", trigger: "change" },
    ],
    suppFileInfoVos6: [
      { required: true, message: "请上传现场设备照片", trigger: "change" },
    ],
  },
  // 账期列表
  paymentDaysList: [],
  // 用户列表
  userList: [],
  // 部门列表
  deptList: [],
  // 项目列表
  projectList: [],
  // 是否列表
  flagList: [
    {
      label: "是",
      value: 0,
    },
    {
      label: "否",
      value: 1,
    },
  ],
});
const {
  contractForm,
  contactForm,
  queryRules,
  queryContactRules,
  paymentDaysList,
  userList,
  deptList,
  projectList,
  flagList,
} = toRefs(data);
const contactAddShow = ref(false);

// /**
//  * @description: 文件上传成功处理
//  * @param {Object} response 文件信息
//  */
// function uploadSuccess(response) {
//   console.log(contractForm.value);
//   contractForm.value.ywImplProAddFileReqVos.push({
//     ...response,
//     businessType: 17,
//   });
// }

// /**
//  * @description: 删除文件
//  * @param {Number} index 当前文件索引
//  */
// function uploadRemove(index) {
//   contractForm.value.ywImplProAddFileReqVos.splice(index, 1);
// }
/**
 * @description: 处理点位变更
 */
const handlePointChange = (value)=>{
  if (value) {
    pointList.value.forEach((item) => {
      if (item.projectTaskDetailId === value) {
        contactForm.value.pointNameChi = item.pointAdd;
      }
    });
  } else {
    contactForm.value.pointNameChi = "";
  }
}
/**
 * @description: 处理防区变更
 */
 const handleDefenseChange = async (value) => {
  contactForm.value.deviceId = null;
  contactForm.value.deviceModel = "";
    contactForm.value.deviceType = null;
    contactForm.value.manufacturer = "";
    contactForm.value.installType = "";
    contactForm.value.deviceUuid = "";
    contactForm.value.simCard = "";
    contactForm.value.ipAddress = "";
    contactForm.value.deviceName = "";
    contactForm.value.deviceTypeName = "";
  getArmedzoneDevice();
  if (value) {
    defenseList.value.forEach((item) => {
      if (item.id === value) {
        contactForm.value.armedzoneName = item.armedzoneName;
      }
    });
  } else {
    contactForm.value.armedzoneName = "";
  }
};

// 设备列表
const getArmedzoneDevice = () => {
  if (contactForm.value.armedzoneId) {
    getArmedzoneDeviceApi(contactForm.value.armedzoneId).then((res) => {
      deviceList.value = res;
    });
  } else {
    deviceList.value = [];
  }
};

/**
 * @description: 文件上传成功处理
 * @param {Object} response 文件信息
 */
 function uploadSuccess(response, type) {
  if(type == 0) {
    contractForm.value.ywImplProAddFileReqVos.push({
    ...response,
    businessType: 17,erpTaskType: 0  });
    return 
  }
  switch (props.rowdata.missionType) {
    case 0:
      // 项目启动会
      contractForm.value.ywImplProAddFileReqVos.push({
    ...response,
    businessType: 17,
  });
      break;
    case 1:
      // 现场勘察
      contactForm.value[`suppFileInfoVos${type}`].push({
        ...response,
        businessType: 18,
        erpTaskType: type,
      });
      break;
    case 2:
      // 制定项目方案
      contractForm.value.ywImplProInfoReqVos[0].suppFileInfoVos.push({
        ...response,
        businessType: 17,
        erpTaskType: 0,
      });
      break;
    case 3:
      // 配件/设备出库
      contractForm.value.ywImplProInfoReqVos[0].suppFileInfoVos.push({
        ...response,
        businessType: 17,
        erpTaskType: 0,
      });
      break;
    case 4:
      contactForm.value[`suppFileInfoVos${type}`].push({
        ...response,
        businessType: 19,
        erpTaskType: type,
      });
      break;
    case 5:
      // 设备到货清单-销售
      contractForm.value.ywImplProInfoReqVos[0].suppFileInfoVos.push({
        ...response,
        businessType: 17,
        erpTaskType: 0,
      });
      break;
    case 6:
      // 飞行验收
      contractForm.value.ywImplProInfoReqVos[0].suppFileInfoVos.push({
        ...response,
        businessType: 17,
        erpTaskType: 0,
      });
      break;
    case 7:
      // 项目验收
      contractForm.value.ywImplProInfoReqVos[0].suppFileInfoVos.push({
        ...response,
        businessType: 17,
        erpTaskType: 0,
      });
      break;
    default:
      break;
  }
}

/**
 * @description: 处理时间变更
 */
 const handleTimeChange = (flag) => {
  if (contractForm.value.actualStartTime && contractForm.value.finishTime &&contractForm.value.actualStartTime > contractForm.value.finishTime) {
    ElMessage.info("实际开始时间不能大于实际结束时间！");
    if (flag == 1) {
      contractForm.value.actualStartTime = "";
    } else {
      contractForm.value.finishTime = "";
    }
  }
};

/**
 * @description: 删除文件
 * @param {Number} index 当前文件索引
 */
function uploadRemove(index, type) {
  if(type == 0) {
    contractForm.value.ywImplProAddFileReqVos.splice(index, 1);
    return 
  }
  switch (props.rowdata.missionType) {
    case 0:
      // 项目启动会
      contractForm.value.ywImplProInfoReqVos[0].suppFileInfoVos.splice(index, 1);
      break;
    case 1:
      // 现场勘察
      contactForm.value[`suppFileInfoVos${type}`].splice(index, 1);
      break;
    case 2:
      // 制定项目方案
      contractForm.value.ywImplProInfoReqVos[0].suppFileInfoVos.splice(index, 1);
      break;
    case 3:
      // 配件/设备出库
      contractForm.value.ywImplProInfoReqVos[0].suppFileInfoVos.splice(index, 1);
      break;
    case 4:
      contactForm.value[`suppFileInfoVos${type}`].splice(index, 1);
      break;
    case 5:
      // 设备到货清单-销售
      contractForm.value.ywImplProInfoReqVos[0].suppFileInfoVos.splice(index, 1);
      break;
    case 6:
      // 飞行验收
      contractForm.value.ywImplProInfoReqVos[0].suppFileInfoVos.splice(index, 1);
      break;
    case 7:
      // 项目验收
      contractForm.value.ywImplProInfoReqVos[0].suppFileInfoVos.splice(index, 1);
      break;
    default:
      break;
  }
}

/**
 * @description: 处理设备变更
 */
 const handleDeviceChange = async (value) => {
  if (value) {
    deviceList.value.forEach((item) => {
      if (item.id === value) {
        console.log("处理设备变更");
        console.log(item);
        contactForm.value.deviceModel = item.model;
        contactForm.value.deviceType = item.deviceTypeId;
        contactForm.value.deviceTypeName = item.deviceType;
        contactForm.value.manufacturer = item.brand;
        contactForm.value.installType = item.installType;
        // contactForm.value.deviceUuid = item.deviceUuid;
        contactForm.value.simCard = item.simInfo;
        contactForm.value.ipAddress = item.ipaddress;
        contactForm.value.deviceName = item.armedzoneName;
      }
    });
  } else {
    contactForm.value.deviceModel = "";
    contactForm.value.deviceType = null;
    contactForm.value.manufacturer = "";
    contactForm.value.installType = "";
    // contactForm.value.deviceUuid = "";
    contactForm.value.simCard = "";
    contactForm.value.ipAddress = "";
    contactForm.value.deviceName = "";
    contactForm.value.deviceTypeName = "";
  }
};

/**
 * @description: 保存
 */
const handleraddbusSchedule = async (type) => {
  if (!projectFormRef.value) return;
  if (!contractForm.value.patrolSchemeAddInfoVos.length) {
    return ElMessage.warning("请添加现场点位！");
  }
  await projectFormRef.value.validate(async (valid, fields) => {
    if (valid) {
      ElMessageBox.confirm("确定保存以上数据吗？", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
        confirmButtonClass: "confirmBtnClass",
        cancelButtonClass: "cancelBtnClass",
      })
        .then(async () => {
          contractForm.value.type = type;
          contractForm.value.ywImplProInfoReqVos = contractForm.value.patrolSchemeAddInfoVos
          contractForm.value.ywImplProInfoReqVos.forEach((item) => {
                // ];
                  item.suppFileInfoVos = [
                    ...(item.suppFileInfoVos1 ? item.suppFileInfoVos1 : []),
                    ...(item.suppFileInfoVos2 ? item.suppFileInfoVos2 : []),
                    ...(item.suppFileInfoVos3 ? item.suppFileInfoVos3 : []),
                    ...(item.suppFileInfoVos4 ? item.suppFileInfoVos4 : []),
                    ...(item.suppFileInfoVos5 ? item.suppFileInfoVos5 : []),
                    ...(item.suppFileInfoVos6 ? item.suppFileInfoVos6 : []),
                    ...(item.suppFileInfoVos7 ? item.suppFileInfoVos7 : []),
                  ];
              });
          let res = await projectSubmitTaskApi(contractForm.value);
          if (res.code === 200) {
            emit("update:followAddShow", false);
            emit("refreshList", false);
            ElMessage.success(res.msg);
            contractForm.value = JSON.parse(JSON.stringify(contractFormTemplate));
          } else {
            ElMessage.error(res.msg);
          }
        })
        .catch(() => {});
    }
  });


  // ElMessageBox.confirm("确定保存以上数据吗？", "提示", {
  //   confirmButtonText: "确定",
  //   cancelButtonText: "取消",
  //   type: "warning",
  //   confirmButtonClass: "confirmBtnClass",
  //   cancelButtonClass: "cancelBtnClass",
  // })
  //   .then(async () => {
  //     let res;
  //     if (!editFlag.value) {
  //       res = await pollingAddApi(contractForm.value);
  //     } else {
  //       const obj = {
  //         deletePatrolSchemeAddInfoVos: deleteList.value,
  //         patrolSchemeAddInfoVos: contractForm.value.patrolSchemeAddInfoVos,
  //       };
  //       res = await pollingEditApi(obj);
  //     }

  //     if (res.code === 200) {
  //       emit("update:followAddShow", false);
  //       emit("refreshList", false);
  //       ElMessage.success(res.msg);
  //       contractForm.value = JSON.parse(JSON.stringify(contractFormTemplate));
  //     } else {
  //       ElMessage.error(res.msg);
  //     }
  //   })
  //   .catch(() => {});
};

/**
 * @description: 返回
 */
const handleBack = () => {
  if (props.pageType === "detail") {
    emit("update:followAddShow", false);
    contractForm.value = JSON.parse(JSON.stringify(contractFormTemplate));
  } else {
    ElMessageBox.confirm("确定返回上一级吗?以上数据未保存将会丢失!", "提示", {
      confirmButtonText: "确定",
      cancelButtonText: "取消",
      type: "warning",
      confirmButtonClass: "confirmBtnClass",
      cancelButtonClass: "cancelBtnClass",
    })
      .then(async () => {
        emit("update:followAddShow", false);
        contractForm.value = JSON.parse(JSON.stringify(contractFormTemplate));
      })
      .catch(() => {});
  }
};
const handleRefresh = ()=>{
  contactForm.value = {
        actualHour: "", // 实际工时
        armedzoneId: null, // 防区id
        armedzoneName: "", // 防区中文
        cityId: null, // 市
        detailAdd: "", // 详细地址
        deviceModel: "", // 	设备型号
        deviceName: "", // 	设备名称
        deviceType: null, // 	设备类型
        deviceTypeName: "", // 	设备类型中文
        deviceUuid: "", // 设备唯一id
        installType: "", // 	安装方式
        ipAddress: "", // IP地址
        manufacturer: "", // 	生产厂家
        pointAdd: "", // 点位地址
        policeOffice: "", // 所属派出所
        policeWay: "", // 民警联系方式
        projectTaskDetailId: null, // 明细id
        propertyName: "", // 物业名称
        propertyWay: "", // 物业联系方式
        provinceId: null, // 	省
        routBrand: "", // 路由器品牌型号
        simCard: "", // SIM卡信息
        suppFileInfoVos1: [], // 现场实地照片
        suppFileInfoVos2: [], // 外包用工合同
        suppFileInfoVos3: [], // 配件清单表
        suppFileInfoVos4: [], // 用电协议
        suppFileInfoVos5: [], // 现场完成照片
        suppFileInfoVos6: [], // 现场设备照片
        suppFileInfoVos7: [], // 物业租赁合同
        zoneId: null, // 区
      }
}
/**
 * @description: 新增、编辑联系人
 * @param {Object} contactFormRef 联系人表单引用
 */
const handleContactAdd = async (contactFormRef) => {
  if (!contactFormRef) return;
  await contactFormRef.validate(async (valid, fields) => {
    if (valid) {
      if (operateType.value === "edit") {
        contractForm.value.patrolSchemeAddInfoVos[tableIndex.value] =
          JSON.parse(JSON.stringify(contactForm.value));
      } else {
        contractForm.value.patrolSchemeAddInfoVos.push({
          ...JSON.parse(JSON.stringify(contactForm.value))
        });
      }
      contactForm.value = {
        actualHour: "", // 实际工时
        armedzoneId: null, // 防区id
        armedzoneName: "", // 防区中文
        cityId: null, // 市
        detailAdd: "", // 详细地址
        deviceModel: "", // 	设备型号
        deviceName: "", // 	设备名称
        deviceType: null, // 	设备类型
        deviceTypeName: "", // 	设备类型中文
        deviceUuid: "", // 设备唯一id
        installType: "", // 	安装方式
        ipAddress: "", // IP地址
        manufacturer: "", // 	生产厂家
        pointAdd: "", // 点位地址
        policeOffice: "", // 所属派出所
        policeWay: "", // 民警联系方式
        projectTaskDetailId: null, // 明细id
        propertyName: "", // 物业名称
        propertyWay: "", // 物业联系方式
        provinceId: null, // 	省
        routBrand: "", // 路由器品牌型号
        simCard: "", // SIM卡信息
        suppFileInfoVos1: [], // 现场实地照片
        suppFileInfoVos2: [], // 外包用工合同
        suppFileInfoVos3: [], // 配件清单表
        suppFileInfoVos4: [], // 用电协议
        suppFileInfoVos5: [], // 现场完成照片
        suppFileInfoVos6: [], // 现场设备照片
        suppFileInfoVos7: [], // 物业租赁合同
        zoneId: null, // 区
      }
      contactFormRef.resetFields();
      nextTick(() => {
        refSelect.value.focus();
      });
      operateType.value = "add";
    } else {
      console.log("error submit!");
    }
  });
};

/**
 * @description: 处理销售清单表格操作
 * @param {String} type 操作类型
 * @param {Object} row  当前行数据
 * @param {Number} tabIndex 表格当前索引
 */
const handleOperate = (type, row, tabIndex) => {
  if (type === "edit") {
    tableIndex.value = tabIndex;
    contactForm.value = JSON.parse(JSON.stringify(row));
    contactAddShow.value = true;
    operateType.value = "edit";
    nextTick(() => {
      refSelect.value.focus();
    });
  } else {
    deleteList.value.push(JSON.parse(JSON.stringify(row)));
    contractForm.value.patrolSchemeAddInfoVos.splice(tabIndex, 1);
  }
};
/**
 * @description: 处理部门选择
 * @param {Number} value 当前值
 */
const handleDepart = async (value, flag = true) => {
  if (flag) {
    contactForm.value.allotRelList = [];
  }
  if (value) {
    const selectDept = deptList.value.find((dept) => dept.deptId === value);
    // 打印所选部门信息
    console.log(selectDept);
    if (selectDept) {
      await getUserListApi(selectDept.deptType).then((res) => {
        if (res) {
          userList.value = res;
        }
      });
    } else {
      userList.value = [];
    }
  } else {
    userList.value = [];
  }
};
/**
 * @description: 处理详情信息
 * @param {Number} id
 */
const handleDetailInfo = async () => {

   const res = await executeTaskInfoApi(props.rowdata.missionCenterId)
  console.log('详情');
  console.log(res)
  contractForm.value.projectId = props.rowdata.projectId;
  contractForm.value.businessId = props.rowdata.businessId;
  contractForm.value.businessType = props.rowdata.businessType;
  contractForm.value.missionType = props.rowdata.missionType;
  contractForm.value.missionCenterId = props.rowdata.missionCenterId;
  contractForm.value.ywImplProAddFileReqVos = []
  contractForm.value.actualStartTime = res.taskInfoRespVo.actualStartTime
  contractForm.value.finishTime = res.taskInfoRespVo.finishTime
  contractForm.value.performance = res.taskInfoRespVo.performance
  contractForm.value.ywImplProAddFileReqVos = res.taskInfoRespVo.suppFileInfoVos || []
  contractForm.value.patrolSchemeAddInfoVos = res.taskInfoRespVo.ywProjectTaskDetailInfoRespVos || []
  if(contractForm.value.patrolSchemeAddInfoVos.length) {
    contractForm.value.patrolSchemeAddInfoVos.forEach((followItem) => {
                  followItem.suppFileInfoVos = []
      followItem.suppFileInfoVos1 = []
      followItem.suppFileInfoVos2 = []
      followItem.suppFileInfoVos3 = []
      followItem.suppFileInfoVos4 = []
      followItem.suppFileInfoVos5 = []
      followItem.suppFileInfoVos6 = []
      followItem.suppFileInfoVos7 = []
          });
    contractForm.value.patrolSchemeAddInfoVos.forEach((followItem) => {
            // followItem[`suppFileInfoVos${groupItem.type}`] = []
            followItem.fileGroupInfoVos.forEach((groupItem) => {
              followItem[`suppFileInfoVos${groupItem.type}`] = groupItem.info;
            });
          });

  }
  await getPointList(contractForm.value.projectId).then((res) => {
    console.log("点位列表")
    console.log(res)
      if (res) {
        pointList.value = res;
      }
    });
  
  // try {
  //   detailInfoShow.value = true;
  //   const res = await getPollingApi(props.rowdata.projectId);
  //   console.log("res1");
  //   console.log(res);
  //   if (res.length) {
  //     console.log("???");
  //     editFlag.value = true;
  //   }
  //   contractForm.value.patrolSchemeAddInfoVos = res;
  //   detailInfoShow.value = false;
  // } catch (error) {
  //   detailInfoShow.value = false;
  // }
};

/**
 * @description: 获取字典
 */
async function getDicts() {
   // 防区
   await getDenfenseList().then((res) => {
    if (res) {
      defenseList.value = res;
    }
  });
  await getDictsApi("erp_account_period").then((res) => {
    if (res.code === 200) {
      paymentDaysList.value = res.data;
    }
  });
  await getDeptListApi().then((res) => {
    if (res.code === 200) {
      deptList.value = res.data;
    }
  });
  await getUserListApi(2).then((res) => {
    if (res) {
      userList.value = res;
    }
  });
}

onMounted(() => {
  getDicts();
  handleDetailInfo();
  nextTick(() => {
    refSelect.value.focus();
  });
});

defineExpose({
  handleDetailInfo,
  handleraddbusSchedule,
});
</script>
<style lang="scss" scoped>
.contractAdd {
  padding: 20px;
  width: 100%;
  height: 690px;
  overflow: auto;
  .pointBox {
    padding-top: 20px;
    display: flex;
    height: 100%;
    
  }
  // :deep(.el-date-editor.el-input, .el-date-editor.el-input__wrapper) {
  //   width: 268px !important;
  //   height: 34px !important;
  // }

  // .search-input {
  //   width: 268px;
  //   height: 34px;
  // }
  .contract-info {
    padding: 20px 20px 5px 20px;
    background-color: #f0f0f0;
    margin: 10px 0;
  }
  .contact-info {
    width: 800px;
    padding: 20px 0;
  }
  .table-icon {
    cursor: pointer;
  }
  .contact-table-info {
    width: 780px;
    min-height: 200px;
    border-left: 1px solid #000;
    padding-left: 20px;
    margin-left: 20px;
 
  }
  .box-item {
    position: relative;
    border: 1px solid #d7d7d7;
    width: 650px;
    min-height: 350px;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
  }
  .item-btn {
    position: absolute;
    right: 10px;
  }
  .item {
    display: flex;
  }
  .mb10{
    margin-bottom:15px;
  }
  .box-content {
    display: block;
    width: 200px;
    text-align: left;
    overflow: hidden;
  }
  .box-title {
    text-align: right;
    width: 108px;
    display: block;
  }
  :deep(.el-table) {
    th.el-table__cell {
      background: #f8f8f8 !important;
    }
  }
  //   :deep(.el-select) {
  //     width: 100%;
  //     // min-height: 50px !important;
  //     height: 100% !important;
  //     .el-input__wrapper {
  //       // min-height: 50px !important;
  //       height: inherit !important;
  //     }
  //     .el-input__inner {
  //       height: 100% !important;
  // }
  //   }
}
</style>
